import request from '../utils/request'
//登录
function login(data) {
    return request.post('/api/login', data)
}
//注册
function regsiter(data) {
    return request.post('/api/regsiter', data)
}
//list
function list(data) {
    return request.get('/api/list', data)
}

//list页面搜索、1
function listsearch(data) {
    return request.post('/api/listsearch', data)
}


//list  home  页面1
function homelist(data) {
    return request.get('/api/homelist', data)
}


//shop页面1
function shoplist(data) {
    return request.get('/api/shoplist', data)
}
function shopcarlist(data) {
    return request({
        url: '/shopcarlist',
        method: 'post',
        data
    })
}
//
function addcar(data) {
    return request({
        url: '/addcar',
        method: 'post',
        data
    })
}
//
function delcar(data) {
    return request({
        url: '/delcar',
        method: 'post',
        data
    })
}
//
function changecar(data) {
    return request({
        url: '/changecar',
        method: 'post',
        data
    })
}
//
function exitflag(data) {
    return request({
        url: '/exitflag',
        method: 'post',
        data
    })
}
//
function checkall(data) {
    return request({
        url: '/checkall',
        method: 'post',
        data
    })
}

function addpayment(data) {
    return request({
        url: '/addpayment',
        method: 'post',
        data
    })
}

function orderlist(data) {
    return request({
        url: '/orderlist',
        method: 'post',
        data
    })
}


function address(data) {
    return request({
        url: '/api/address',
        method: 'post',
        data
    })
}

function ali(data) {
    // return request({
    //     url: '/api/ali',
    //     method: 'get',
    //     data
    // })
    return request.get('/api/ali',{params:{data}})
}

export {
    login,
    regsiter,
    list,
    listsearch,
    homelist,
    shoplist,
    shopcarlist,
    addcar,
    delcar,
    changecar,
    exitflag,
    checkall,
    addpayment,
    orderlist,
    address,
    ali
}